package com.example;

/**
 * @desc:
 * @author: Shoko
 * @date: 2025/6/1
 */
// 主任审批者
public class Director extends Approver {
    public Director(String name) {
        super(name);
    }

    @Override
    public void handleRequest(PurchaseRequest request) {
        if (request.getAmount() <= 10000) {
            System.out.println("主任" + name + "审批采购单：" + request.getRequestName() + "，金额：" + request.getAmount());
        } else {
            if (successor != null) {
                successor.handleRequest(request);
            }
        }
    }
}